3.215 \(\int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{\sqrt {a+i a \tan (c+d x)}} \, dx\)

Optimal. Leaf size=214 \[ \frac {(A-i B) \sqrt {1+i \tan (c+d x)} \tan ^{m+1}(c+d x) F_1\left (m+1;\frac {1}{2},1;m+2;-i \tan (c+d x),i \tan (c+d x)\right )}{2 d (m+1) \sqrt {a+i a \tan (c+d x)}}+\frac {(2 m+1) (-B+i A) \sqrt {a+i a \tan (c+d x)} \tan ^m(c+d x) (-i \tan (c+d x))^{-m} \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};i \tan (c+d x)+1\right )}{a d}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}} \]

[Out]

(I*A-B)*(1+2*m)*hypergeom([1/2, -m],[3/2],1+I*tan(d*x+c))*(a+I*a*tan(d*x+c))^(1/2)*tan(d*x+c)^m/a/d/((-I*tan(d
*x+c))^m)+(A+I*B)*tan(d*x+c)^(1+m)/d/(a+I*a*tan(d*x+c))^(1/2)+1/2*(A-I*B)*AppellF1(1+m,1/2,1,2+m,-I*tan(d*x+c)
,I*tan(d*x+c))*(1+I*tan(d*x+c))^(1/2)*tan(d*x+c)^(1+m)/d/(1+m)/(a+I*a*tan(d*x+c))^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.63, antiderivative size = 214, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3596, 3601, 3564, 135, 133, 3599, 67, 65} \[ \frac {(A-i B) \sqrt {1+i \tan (c+d x)} \tan ^{m+1}(c+d x) F_1\left (m+1;\frac {1}{2},1;m+2;-i \tan (c+d x),i \tan (c+d x)\right )}{2 d (m+1) \sqrt {a+i a \tan (c+d x)}}+\frac {(2 m+1) (-B+i A) \sqrt {a+i a \tan (c+d x)} \tan ^m(c+d x) (-i \tan (c+d x))^{-m} \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};i \tan (c+d x)+1\right )}{a d}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}} \]

Antiderivative was successfully verified.

[In]

Int[(Tan[c + d*x]^m*(A + B*Tan[c + d*x]))/Sqrt[a + I*a*Tan[c + d*x]],x]

[Out]

((A + I*B)*Tan[c + d*x]^(1 + m))/(d*Sqrt[a + I*a*Tan[c + d*x]]) + ((A - I*B)*AppellF1[1 + m, 1/2, 1, 2 + m, (-
I)*Tan[c + d*x], I*Tan[c + d*x]]*Sqrt[1 + I*Tan[c + d*x]]*Tan[c + d*x]^(1 + m))/(2*d*(1 + m)*Sqrt[a + I*a*Tan[
c + d*x]]) + ((I*A - B)*(1 + 2*m)*Hypergeometric2F1[1/2, -m, 3/2, 1 + I*Tan[c + d*x]]*Tan[c + d*x]^m*Sqrt[a +
I*a*Tan[c + d*x]])/(a*d*((-I)*Tan[c + d*x])^m)

Rule 65

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)*Hypergeometric2F1[-m, n +
 1, n + 2, 1 + (d*x)/c])/(d*(n + 1)*(-(d/(b*c)))^m), x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Inte
gerQ[m] || GtQ[-(d/(b*c)), 0])

Rule 67

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Dist[((-((b*c)/d))^IntPart[m]*(b*x)^FracPart[m])/
(-((d*x)/c))^FracPart[m], Int[(-((d*x)/c))^m*(c + d*x)^n, x], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[m]
 &&  !IntegerQ[n] &&  !GtQ[c, 0] &&  !GtQ[-(d/(b*c)), 0]

Rule 133

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Simp[(c^n*e^p*(b*x)^(m +
 1)*AppellF1[m + 1, -n, -p, m + 2, -((d*x)/c), -((f*x)/e)])/(b*(m + 1)), x] /; FreeQ[{b, c, d, e, f, m, n, p},
 x] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])

Rule 135

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Dist[(c^IntPart[n]*(c +
d*x)^FracPart[n])/(1 + (d*x)/c)^FracPart[n], Int[(b*x)^m*(1 + (d*x)/c)^n*(e + f*x)^p, x], x] /; FreeQ[{b, c, d
, e, f, m, n, p}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] &&  !GtQ[c, 0]

Rule 3564

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dis
t[(a*b)/f, Subst[Int[((a + x)^(m - 1)*(c + (d*x)/b)^n)/(b^2 + a*x), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b,
 c, d, e, f, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]

Rule 3596

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[((a*A + b*B)*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1))/(2
*f*m*(b*c - a*d)), x] + Dist[1/(2*a*m*(b*c - a*d)), Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Si
mp[A*(b*c*m - a*d*(2*m + n + 1)) + B*(a*c*m - b*d*(n + 1)) + d*(A*b - a*B)*(m + n + 1)*Tan[e + f*x], x], x], x
] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] &&  !GtQ[n,
0]

Rule 3599

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[(b*B)/f, Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^n, x], x, Tan[e + f*x
]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && EqQ[A*b + a*B,
 0]

Rule 3601

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[(A*b + a*B)/b, Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n, x]
, x] - Dist[B/b, Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n*(a - b*Tan[e + f*x]), x], x] /; FreeQ[{a, b
, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[A*b + a*B, 0]

Rubi steps

\begin {align*} \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{\sqrt {a+i a \tan (c+d x)}} \, dx &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {\int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} \left (-a (A m+i B (1+m))+\frac {1}{2} a (i A-B) (1+2 m) \tan (c+d x)\right ) \, dx}{a^2}\\ &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {(A-i B) \int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx}{2 a}-\frac {((A+i B) (1+2 m)) \int \tan ^m(c+d x) (a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)} \, dx}{2 a^2}\\ &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {(a (i A+B)) \operatorname {Subst}\left (\int \frac {\left (-\frac {i x}{a}\right )^m}{\sqrt {a+x} \left (-a^2+a x\right )} \, dx,x,i a \tan (c+d x)\right )}{2 d}-\frac {((A+i B) (1+2 m)) \operatorname {Subst}\left (\int \frac {x^m}{\sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{2 d}\\ &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}-\frac {\left ((A+i B) (1+2 m) (-i \tan (c+d x))^{-m} \tan ^m(c+d x)\right ) \operatorname {Subst}\left (\int \frac {(-i x)^m}{\sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{2 d}+\frac {\left (a (i A+B) \sqrt {1+i \tan (c+d x)}\right ) \operatorname {Subst}\left (\int \frac {\left (-\frac {i x}{a}\right )^m}{\sqrt {1+\frac {x}{a}} \left (-a^2+a x\right )} \, dx,x,i a \tan (c+d x)\right )}{2 d \sqrt {a+i a \tan (c+d x)}}\\ &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {(A-i B) F_1\left (1+m;\frac {1}{2},1;2+m;-i \tan (c+d x),i \tan (c+d x)\right ) \sqrt {1+i \tan (c+d x)} \tan ^{1+m}(c+d x)}{2 d (1+m) \sqrt {a+i a \tan (c+d x)}}+\frac {(i A-B) (1+2 m) \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};1+i \tan (c+d x)\right ) (-i \tan (c+d x))^{-m} \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)}}{a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]  time = 180.00, size = 0, normalized size = 0.00 \[ \text {\$Aborted} \]

Verification is Not applicable to the result.

[In]

Integrate[(Tan[c + d*x]^m*(A + B*Tan[c + d*x]))/Sqrt[a + I*a*Tan[c + d*x]],x]

[Out]

$Aborted

________________________________________________________________________________________

fricas [F]  time = 0.63, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\sqrt {2} {\left ({\left (A - i \, B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + A + i \, B\right )} \left (\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{m} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (-i \, d x - i \, c\right )}}{2 \, a}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^m*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

integral(1/2*sqrt(2)*((A - I*B)*e^(2*I*d*x + 2*I*c) + A + I*B)*((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I
*c) + 1))^m*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*e^(-I*d*x - I*c)/a, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{m}}{\sqrt {i \, a \tan \left (d x + c\right ) + a}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^m*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate((B*tan(d*x + c) + A)*tan(d*x + c)^m/sqrt(I*a*tan(d*x + c) + a), x)

________________________________________________________________________________________

maple [F]  time = 3.93, size = 0, normalized size = 0.00 \[ \int \frac {\left (\tan ^{m}\left (d x +c \right )\right ) \left (A +B \tan \left (d x +c \right )\right )}{\sqrt {a +i a \tan \left (d x +c \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^m*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^(1/2),x)

[Out]

int(tan(d*x+c)^m*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^(1/2),x)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^m*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is undefined.

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\mathrm {tan}\left (c+d\,x\right )}^m\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )}{\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((tan(c + d*x)^m*(A + B*tan(c + d*x)))/(a + a*tan(c + d*x)*1i)^(1/2),x)

[Out]

int((tan(c + d*x)^m*(A + B*tan(c + d*x)))/(a + a*tan(c + d*x)*1i)^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + B \tan {\left (c + d x \right )}\right ) \tan ^{m}{\left (c + d x \right )}}{\sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**m*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))**(1/2),x)

[Out]

Integral((A + B*tan(c + d*x))*tan(c + d*x)**m/sqrt(I*a*(tan(c + d*x) - I)), x)

________________________________________________________________________________________